Hi guys, first post here - I’m an absolute beginner.
I’m trying to get some more automation done with Azure Alerting and PagerDuty.
We are a managed service provider and create PagerDuty services per customer, this is where I want to increase automation of our current process.
Yesterday I started making API calls with postman, lots of cool stuff to do here, but I am stuck with two things, since they don’t seem to be documented:
First:
For Azure Alerting we are using the integration URL of the PagerDuty service. I can display this one via the PagerDuty portal, it reads
https://events.pagerduty.com/integration/{IntegrationKey}/enqueue
I would like to return this URL via API but it seems it can’t be retrieved.
GET https://api.pagerduty.com/services/{serviceID}/integrations/{integrationID}
Gets me close, but not quite there. Returns body:
{
"integration": {
"id": "XXXXXXX",
"type": "event_transformer_api_inbound_integration",
"summary": "Microsoft Azure",
"self": "https://api.pagerduty.com/services/XXXXXXX/integrations/XXXXXXX",
"html_url": "https://XX.pagerduty.com/services/XXXXXXX/integrations/XXXXXXX",
"name": "Microsoft Azure",
"service": {
"id": "XXXXXXX",
"type": "service_reference",
"summary": "XXXXX",
"self": "https://api.pagerduty.com/services/XXXXXXX",
"html_url": "https://XX.pagerduty.com/service-directory/XXXXXXX"
},
"created_at": "2022-XX-XXTXX:XX:XX+XX:XX",
"vendor": {
"id": "XXXXXXX",
"type": "vendor_reference",
"summary": "Microsoft Azure",
"self": "https://api.pagerduty.com/vendors/XXXXXXX",
"html_url": null
},
"integration_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"config": {
"fields": {}
}
}
}
I would have suspected that the URL would be in the same block as the integration key:
"integration_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"config": {
"fields": {}
}
But this is all I get.
Is there a way to get the whole URL or do I have to build it myself using the default URL pattern
https://events.pagerduty.com/integration/{IntegrationKey}/enqueue
and add the integration key inbetween manually?
Second:
Is there any way to add a link to the Remediation part of the Service Settings through API?
This would help me out a bunch.
Thank you and kind regards
Daniel